<style lang="less" scoped>
  @import "../assets/css/activity.less";
  @import '~vux/src/styles/center.less';

</style>
<template>
  <div class="activity">
    <div class="item-date" v-for="item in shopList">
      <div class="date">
        <hr>
        <span>{{item.date}}</span>
        <hr>
      </div>
      <div class="shop">
        <div class="item-shop" :class="{'item-last':item.detail.length%2!==0&&key===item.detail.length-1}" v-for="(detail, key) in item.detail">
          <div class="img-contain">
            <img src="../assets/images/avatar.jpg" :src="detail.imgSrc" alt="">
          </div>
          <div class="title" style="-webkit-box-orient: vertical;">{{detail.title}}</div>
          <div class="price">
            <span class="fz-16 color-E52C2C fw">￥{{detail.price}}</span>
            <span class="fz-12 color-999 original-price">￥{{detail.originalPrice}}</span>
          </div>
        </div>
        <div class="clear"></div>
      </div>
    </div>
  </div>
</template>
<script>
  import common from '../js/common'
  export default {
    name: 'activity',
    components: {

    },
    data () {
      return {
        isAndroid: true,
        shopList: [
          {
            date: '6月27日',
            detail: [
              {
                imgSrc: require('../assets/images/avatar.jpg'),
                title: '韩国2017下级新品白色两件套雪纺衫宽松高领喇叭七件套',
                price: 109,
                originalPrice: 209
              }
            ]
          },
          {
            date: '6月28日',
            detail: [
              {
                imgSrc: require('../assets/images/avatar.jpg'),
                title: '韩国2017下级新品白色两件套雪纺衫宽松高领喇叭七件套',
                price: 109,
                originalPrice: 209
              },
              {
                imgSrc: require('../assets/images/avatar.jpg'),
                title: '韩国2017下级新品白色两件套雪纺衫宽松高领喇叭七件套',
                price: 109,
                originalPrice: 209
              },
              {
                imgSrc: require('../assets/images/avatar.jpg'),
                title: '韩国2017下级新品白色两件套雪纺衫宽松高领喇叭七件套',
                price: 109,
                originalPrice: 209
              }
            ]
          }
        ]
      }
    },
    computed: {

    },
    /**
     * 过滤器
     * 如：
     *  formatDate: function (v) {
     *      return v.replace(/T|Z/g, ' ')
     *   }
     *
     *   使用方法在页面 {{ 属性 | 过滤器名称 }}
     * */
    filters: {
      /**
       *  格式化数字，即使为0，都保留 2位小数
       * */
      formatTime(time) {
        return util.formatDate(time, 'hh:mm:ss');
      }
    },
    mounted() {


      common.methods.setTitle('活动'); // 修改顶部导航标题
      var u = navigator.userAgent;
      var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
      isAndroid ? this.isAndroid = true : this.isAndroid = false;
    },
    methods: {

    },
    watch: {

    }
  }
</script>
